package com.doit.day03

object _apply方法 {
  def main(args: Array[String]): Unit = {

    val arr: Array[Int] = Array(1, 2, 3, 4)
    val num: Int = arr(0)//arr[0]
    val num1: Int = arr.apply(0)
    println(num)
    println(num1)


    //伴生类和伴生对象
    val ints: Array[Int] = new Array[Int](6)

  }
}
